home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.sept.archive / 000055_crash!stack.urc.tue.nl!leon_Thu, 23 Sep 93 04:55:31 PST.msg < prev    next >
Text File  |  1993-11-02  |  2KB  |  60 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Thu, 23 Sep 93 04:55:31 PST
  3. Received: from mailhost.tue.nl by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0ofoqK-00007RC; Thu, 23 Sep 93 04:28 PDT
  5. Received: from terra.stack.urc.tue.nl by mailhost.tue.nl with SMTP id AA18962
  6.   (5.65c/IDA-1.4.4 for <amigae@bkhouse.cts.com>); Thu, 23 Sep 1993 13:28:09 +0200
  7. Received: from blade.stack.urc.tue.nl by terra.stack.urc.tue.nl (4.1/1.53)
  8.     id AA10362; Thu, 23 Sep 93 13:25:01 +0200
  9. Received: by blade.stack.urc.tue.nl (4.1/1.53)
  10.     id AA03091; Thu, 23 Sep 93 13:25:24 +0200
  11. Message-Id: <9309231125.AA03091@blade.stack.urc.tue.nl>
  12. Date: Thu, 23 Sep 1993 13:25:19 +0200 (MET DST)
  13. X-Mailer: ELM [version 2.4 PL20]
  14. Mime-Version: 1.0
  15. Content-Type: text/plain; charset=US-ASCII
  16. Content-Transfer-Encoding: 7bit
  17. Content-Length: 1223
  18. From: leon@stack.urc.tue.nl (Leon Woestenberg)
  19. To: amigae@bkhouse.cts.com (AmigaE Mailing List)
  20. Subject: Problem with {procname} and AddTask
  21.  
  22.  
  23. Hello fellows!
  24.  
  25. I nEEd somE hEEElp hErE...
  26.  
  27. I'm having troubles converting a C source, that demonstrates the starting of
  28. and communication between the maintask and a daughtertask (which is started
  29. from the maintask). The C source is on aminet misc/amag/Amiga_9309b.lha and
  30. called 'Multitask/task.c'.
  31.  
  32. The problem comes with 'AddTask', which needs a pointer to the daughtertask.
  33. I now know that {procname} is the address of the procedure in AmigaE, but
  34. I can't get the AmigaE version working (it crashes).
  35.  
  36. Does someone know how to add a PROCedure as a new task in AmigaE??
  37. I cut out some source from the C source.
  38.  
  39. This is the daughtertask procedure:
  40. -----
  41. void __saveds __interrupt TochterTask(void) {
  42.   StopTochterTaskSig=AllocSignal(-1L);
  43.   Signal( MainTask, 1L<<TochterStartedSig );
  44.   while( (SetSignal(0L,0L) &
  45.                     (1L<<StopTochterTaskSig)) == 0)
  46.     TochterCounter++;
  47.   FreeSignal( StopTochterTaskSig );
  48.   Signal( MainTask, 1L<<TochterStartedSig );
  49.   Wait(0);
  50. }
  51. -----
  52. Line of the maintask, which starts the daughtertask:
  53. -----
  54. AddTask(Tochter,(APTR)TochterTask,0L);
  55. -----
  56.  
  57. --
  58. Signatures sold out at the time....  Leon Woestenberg (leon@stack.urc.tue.nl)
  59. If lines are busy, try later. But DO call!
  60. --